//定义切片reducer
import { createSlice,PayloadAction} from "@reduxjs/toolkit";
//引入商品接口状态
// import { ListRawStata } from "../pages/Home";
const CarSlice=createSlice({
  name:"CarSlice",
  //定义redux上的数据(状态)
  initialState:{
    CarList:JSON.parse(localStorage.getItem("cars") || "[]")
  },
  reducers:{
    //
  }
})

//派发  action
// export const {addCar,selCar,allCar,changeCar,delCar}=CarSlice.actions

//抛出reducer
export default CarSlice.reducer